<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>这是div</div>
<input type="text" id="i1">
<input type="button" value="按钮" onclick="f1()">
<script>
  function f1() {
    let i=document.querySelector("#i1");
    let l=document.querySelector("div");
    l.innerText=i.value;
  }
</script>
</body>
</html>